#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>

class SocketSet
{
    fd_set master;
    fd_set read_fds;
    int fdmax;
public:
    SocketSet();
    ~SocketSet();
    void clear();
    void add(int sockfd);
    void remove(int sockfd);
    bool check(int sockfd);
    void scan();
    void scan(double time);
};

int start(char* port);
int connect(char* site, char* port);
int accept(int serverfd);
int send(const char* msg, int length, int sockfd);
int send(std::string msg, int sockfd);
int recieve(char* msg, int length, int sockfd);
// This is function is so simple it doesn't really need a wrapper:
// int close(int sockfd);
